package com.autumn.zero.authorization.web.configure;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.autumn.zero.authorization.web.controllers.ResourcesModuleController;
import com.autumn.zero.authorization.web.controllers.ResourcesModulePermissionController;

/**
 * 基本权限Web管理
 * 
 * @author 老码农 2018-12-09 18:09:00
 */
@Configuration
public class AutumnBaseZeroWebAuthorizationConfiguration {

	/**
	 * 资源模块控制器
	 * 
	 * @return
	 */
	@Bean	
	@ConditionalOnMissingBean(ResourcesModuleController.class)
	public ResourcesModuleController autumnZeroResourcesModuleController() {
		return new ResourcesModuleController();
	}

	/**
	 * 资源模块权限控制器
	 * 
	 * @return
	 */
	@Bean	
	@ConditionalOnMissingBean(ResourcesModulePermissionController.class)
	public ResourcesModulePermissionController autumnZeroResourcesModulePermissionController() {
		return new ResourcesModulePermissionController();
	}

}
